package com.zenchn.dao;

import com.zenchn.generic.GenericDao;
import com.zenchn.model.TMiCustomerUpgrade;
import com.zenchn.model.TMiCustomerUpgradeExample;

import java.time.LocalDateTime;
import java.util.List;

import org.apache.ibatis.annotations.Param;

public interface TMiCustomerUpgradeMapper extends GenericDao<TMiCustomerUpgrade, String, TMiCustomerUpgradeExample> {
    long countByExample(TMiCustomerUpgradeExample example);

    int deleteByExample(TMiCustomerUpgradeExample example);

    int deleteByPrimaryKey(String upgradeId);

    int insert(TMiCustomerUpgrade record);

    int insertSelective(TMiCustomerUpgrade record);

    List<TMiCustomerUpgrade> selectByExample(TMiCustomerUpgradeExample example);

    TMiCustomerUpgrade selectByPrimaryKey(String upgradeId);

    int updateByExampleSelective(@Param("record") TMiCustomerUpgrade record, @Param("example") TMiCustomerUpgradeExample example);

    int updateByExample(@Param("record") TMiCustomerUpgrade record, @Param("example") TMiCustomerUpgradeExample example);

    int updateByPrimaryKeySelective(TMiCustomerUpgrade record);

    int updateByPrimaryKey(TMiCustomerUpgrade record);

    /**
     * 获取晋升数量
     * @param customerIdList
     * @param level
     * @param startDate
     * @param endDate
     * @return
     */
    int selectUpgradeByLevel(@Param("customerIdList") List<String> customerIdList, @Param("level") Integer level, @Param("startDate") LocalDateTime startDate, @Param("endDate") LocalDateTime endDate);
}